<?php

use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
Route::get('/task',[\App\Http\Controllers\task\Task::class,'start']);//定时器开始
Route::post('/send_message',[\App\Http\Controllers\task\Task::class,'send_message']);//发送消息
Route::get('/refresh',[\App\Http\Controllers\cms\Live::class,'get_live_rooms']);//获取直播列表
Route::get('/dy_test',[\App\Http\Controllers\task\Task::class,'dy_test']);//获取直播列表

//权限
Route::prefix("/auth")->group(function (){
    Route::post('/cms_login',[\App\Http\Controllers\auth\Auth::class,'cms_login']);//cms登录
    Route::post('/update_password',[\App\Http\Controllers\auth\Auth::class,'update_password']);//cms修改密码
    Route::get('/check_token',[\App\Http\Controllers\auth\Auth::class,'check_token']);//验证token是否过期
    Route::get('/xcx_login',[\App\Http\Controllers\auth\Auth::class,'xcx_login']);//小程序登录
    Route::get('/check_opcode',[\App\Http\Controllers\auth\Auth::class,'check_opcode']);//小程序登录
    Route::get('/update_egg',[\App\Http\Controllers\auth\Auth::class,'update_egg']);//更新领蛋信息
    Route::post('/bind_model',[\App\Http\Controllers\auth\Auth::class,'bind_model']);//绑定电话号码
    Route::get('/check_reward_opcode',[\App\Http\Controllers\auth\Auth::class,'check_reward_opcode']);//验证核销码
    Route::get('/update_reward_egg',[\App\Http\Controllers\auth\Auth::class,'update_reward_egg']);//更新抽奖领奖信息
    Route::get('/check_tx_opcode',[\App\Http\Controllers\auth\Auth::class,'check_tx_opcode']);//验证提现信息
    Route::get('/update_bind_goods',[\App\Http\Controllers\auth\Auth::class,'update_bind_goods']);//核盲盒信息
    Route::get('/check_bind_opcode',[\App\Http\Controllers\auth\Auth::class,'check_bind_opcode']);//验证盲盒提现信息
    Route::post('/dy_login',[\App\Http\Controllers\auth\Auth::class,'dy_login']);//抖音授权登录
    Route::post('/dy_bind_phone',[\App\Http\Controllers\auth\Auth::class,'dy_bind_phone']);//抖音绑定电话号码
});

//权限
Route::prefix("/cms")->middleware(\App\Http\Middleware\CheckCms::class)->group(function (){
    Route::prefix("/table")->group(function (){
        Route::post('/insert',[\App\Http\Controllers\cms\Table::class,'insert']);//添加表单数据
        Route::post('/update',[\App\Http\Controllers\cms\Table::class,'update']);//更新表单数据
        Route::post('/get',[\App\Http\Controllers\cms\Table::class,'get']);//获取表单数据
        Route::post('/get_all',[\App\Http\Controllers\cms\Table::class,'get_all']);//获取所有数据
        Route::put('/del',[\App\Http\Controllers\cms\Table::class,'del']);//删除表单数据
    });

    Route::prefix("/common")->group(function (){
        Route::post('/uploads_image',[\App\Http\Controllers\cms\Common::class,'uploads_image']);//上传图片
        Route::post('/uploads_video',[\App\Http\Controllers\cms\Common::class,'uploads_video']);//上传视频
        Route::post('/regeo',[\App\Http\Controllers\cms\Common::class,'regeo']);//经纬度坐标转换
        Route::post('/hx_red_pakage',[\App\Http\Controllers\cms\Common::class,'hx_red_pakage']);//核销红包
        Route::post('/map_regeo',[\App\Http\Controllers\cms\Common::class,'map_regeo']);//坐标转换详细地址
        Route::get('/statistics',[\App\Http\Controllers\cms\Common::class,'statistics']);//首页数据统计
    });

    Route::prefix("/sys")->group(function (){
        Route::get('/get',[\App\Http\Controllers\cms\Sys::class,'get']);//获取系统配置
        Route::post('/update',[\App\Http\Controllers\cms\Sys::class,'update']);//更新系统配置
    });

    Route::prefix("/live")->group(function (){
        Route::get('/refresh',[\App\Http\Controllers\cms\Live::class,'get_live_rooms']);//获取直播列表
    });

});

Route::prefix("/user")->group(function (){
    Route::get('/get_infor',[\App\Http\Controllers\user\User::class,'get_infor']);//获取个人信息
    Route::get('/get_my_invite',[\App\Http\Controllers\user\User::class,'get_my_invite']);//获取我邀请的用户
    Route::post('/update_infor',[\App\Http\Controllers\user\User::class,'update_infor']);//更新头像昵称
    Route::post('/send_msg',[\App\Http\Controllers\user\User::class,'send_msg']);//发送模板消息
    Route::get('/get_message',[\App\Http\Controllers\user\User::class,'get_message']);//获取消息
    Route::get('/del_talking',[\App\Http\Controllers\user\User::class,'del_talking']);//删除聊天记录
    Route::get('/create_tx_qrcode',[\App\Http\Controllers\user\User::class,'create_tx_qrcode']);//创建提现申请二维码

    //公用
    Route::prefix("/common")->group(function (){
        Route::get('/get_index',[\App\Http\Controllers\user\Common::class,'get_index']);//获取首页数据
        Route::get('/get_sys',[\App\Http\Controllers\user\Common::class,'get_sys']);//获取系统配置
        Route::get('/get_adviser',[\App\Http\Controllers\user\Common::class,'get_adviser']);//获取置业顾问
        Route::get('/get_collectList',[\App\Http\Controllers\user\Common::class,'get_collectList']);//获取收藏列表
        Route::get('/add_shares',[\App\Http\Controllers\user\Common::class,'add_shares']);//添加分享记录
        Route::get('/add_house_through',[\App\Http\Controllers\user\Common::class,'add_house_through']);//添加房屋浏览
        Route::post('/collect_house',[\App\Http\Controllers\user\Common::class,'collect_house']);//收藏商品
        Route::post('/appointment',[\App\Http\Controllers\user\Common::class,'appointment']);//预约申请
        Route::get('/draw_run',[\App\Http\Controllers\user\Common::class,'draw_run']);//开始转盘抽奖
        Route::get('/get_draw_log',[\App\Http\Controllers\user\Common::class,'get_draw_log']);//获取抽奖记录
        Route::get('/get_article_id',[\App\Http\Controllers\user\Common::class,'get_article_id']);//id获取文章
        Route::get('/get_article',[\App\Http\Controllers\user\Common::class,'get_article']);//id获取文章
        Route::get('/get_active',[\App\Http\Controllers\user\Common::class,'get_active']);//获取活动中心文章
        Route::get('/get_egg_logs',[\App\Http\Controllers\user\Common::class,'get_egg_logs']);//获取鸡蛋领取记录
        Route::get('/get_properties',[\App\Http\Controllers\user\Common::class,'get_properties']);//获取楼栋表
        Route::get('/get_type',[\App\Http\Controllers\user\Common::class,'get_type']);//获取户型
        Route::get('/get_banners',[\App\Http\Controllers\user\Common::class,'get_banners']);//获取广告位
        Route::get('/get_nav',[\App\Http\Controllers\user\Common::class,'get_nav']);//获取导航
        Route::get('/get_TurntableActive',[\App\Http\Controllers\user\Common::class,'get_TurntableActive']);//获取大转盘数据
        Route::get('/get_floor',[\App\Http\Controllers\user\Common::class,'get_floor']);//获取所有楼层
        Route::post('/save_chat',[\App\Http\Controllers\user\Common::class,'save_chat']);//保存聊天消息
        Route::post('/uploads_image',[\App\Http\Controllers\user\Common::class,'uploads_image']);//保存图片
        Route::get('/get_chat_list',[\App\Http\Controllers\user\Common::class,'get_chat_list']);//获取聊天记录
        Route::get('/get_show',[\App\Http\Controllers\user\Common::class,'get_show']);//获取浏览次数
        Route::get('/get_reward_log',[\App\Http\Controllers\user\Common::class,'get_reward_log']);//获取领蛋记录
        Route::get('/get_prize_users',[\App\Http\Controllers\user\Common::class,'get_prize_users']);//获取抽奖参与人数
        Route::get('/star_custom',[\App\Http\Controllers\user\Common::class,'star_custom']);//点赞顾问
        Route::get('/get_live',[\App\Http\Controllers\user\Common::class,'get_live']);//获取直播间
        Route::get('/getPlaybacks',[\App\Http\Controllers\user\Common::class,'getPlaybacks']);//获取单个直播间信息
        Route::get('/tx_hx',[\App\Http\Controllers\user\Common::class,'tx_hx']);//核销提现申请
        Route::get('/get_notice',[\App\Http\Controllers\user\Common::class,'get_notice']);//获取消息通知
        Route::get('/get_custom',[\App\Http\Controllers\user\Common::class,'get_custom']);//获取置业顾问
        Route::get('/get_all_custom',[\App\Http\Controllers\user\Common::class,'get_all_custom']);//获取所有置业顾问
        Route::get('/get_image_banners',[\App\Http\Controllers\user\Common::class,'get_image_banners']);//获取所有置业顾问

    });

    //预约
    Route::prefix("/appointment")->group(function (){
        Route::post('/appointment',[\App\Http\Controllers\user\Common::class,'appointment']);//预约申请
        Route::get('/get_appointment_list',[\App\Http\Controllers\user\Common::class,'get_appointment_list']);//获取预约记录
    });

    //任务
    Route::prefix("/task")->group(function (){
        Route::get('/get_task',[\App\Http\Controllers\user\Task::class,'get_task']);//获取任务
        Route::get('/star_project',[\App\Http\Controllers\user\Task::class,'star_project']);//邀请用户点赞
        Route::get('/get_chicken',[\App\Http\Controllers\user\Task::class,'get_chicken']);//获取小鸡基本信息
        Route::get('/feed_chicken',[\App\Http\Controllers\user\Task::class,'feed_chicken']);//喂鸡
        Route::get('/application_egg',[\App\Http\Controllers\user\Task::class,'application_egg']);//领蛋申请
        Route::get('/is_chiken',[\App\Http\Controllers\user\Task::class,'is_chiken']);//判断用户是否有小鸡
        Route::get('/get_egglog_id',[\App\Http\Controllers\user\Task::class,'get_egglog_id']);//id获取领蛋日志
        Route::get('/get_tree',[\App\Http\Controllers\user\Task::class,'get_tree']);//获取我的发财数
        Route::get('/update_tree',[\App\Http\Controllers\user\Task::class,'update_tree']);//发财树浇水
        Route::get('/get_red_packet',[\App\Http\Controllers\user\Task::class,'get_red_packet']);//领取红包
        Route::get('/is_tree',[\App\Http\Controllers\user\Task::class,'is_tree']);//判断是否有发财树
        Route::get('/bind_box_invite',[\App\Http\Controllers\user\Task::class,'bind_box_invite']);//盲盒邀请用户绑定
        Route::get('/get_bind_box_detail',[\App\Http\Controllers\user\Task::class,'get_bind_box_detail']);//查看盲盒邀请进度
        Route::get('/create_bind_box_qrcode',[\App\Http\Controllers\user\Task::class,'create_bind_box_qrcode']);//获取盲盒二维码
        Route::get('/start_bind_box',[\App\Http\Controllers\user\Task::class,'start_bind_box']);//开始盲盒
        Route::get('/get_user_bind_goods',[\App\Http\Controllers\user\Task::class,'get_user_bind_goods']);//获取用户盲盒商品
        Route::get('/get_all_bind_goods',[\App\Http\Controllers\user\Task::class,'get_all_bind_goods']);//获取用户盲盒商品
        Route::get('/get_bind_progress',[\App\Http\Controllers\user\Task::class,'get_bind_progress']);//获取用户盲盒商品
    });

    //项目
    Route::prefix("/order")->group(function (){
        Route::post('/create_order',[\App\Http\Controllers\user\Order::class,'create_order']);//创建订单
    });

    //优惠卷
    Route::prefix("/coupon")->group(function (){
        Route::get('/insert_coupon',[\App\Http\Controllers\user\Coupon::class,'add_coupon']);//添加优惠卷
        Route::get('/check_coupon',[\App\Http\Controllers\user\Coupon::class,'check_coupon']);//判断用户是否第一次登录
        Route::get('/get_first_coupon',[\App\Http\Controllers\user\Coupon::class,'get_first_coupon']);//首次登录领取购房卷
        Route::get('/get_coupon_price',[\App\Http\Controllers\user\Coupon::class,'get_coupon_price']);//首次登录领取购房卷
    });

    //商品套餐
    Route::prefix("/goods")->group(function (){
        Route::get('/get_goods',[\App\Http\Controllers\user\Goods::class,'getGoods']);//分页获取商品套餐
        Route::get('/get_goods_id',[\App\Http\Controllers\user\Goods::class,'getGoodsId']);//id获取商品
        Route::get('/create_order',[\App\Http\Controllers\user\Goods::class,'create_order']);//创建商品套餐
        Route::get('/get_order',[\App\Http\Controllers\user\Goods::class,'get_order']);//获取商品订单
        Route::get('/hx_order',[\App\Http\Controllers\user\Goods::class,'hx_order']);//订单核销
    });

    //项目
    Route::prefix("/project")->group(function (){
        Route::get('/get_project_id',[\App\Http\Controllers\user\Project::class,'get_project_id']);//id获取项目
        Route::get('/get_project',[\App\Http\Controllers\user\Project::class,'get_project']);//获取项目
    });
});
